#define  _CRT_SECURE_NO_WARNINGS


#include<stdio.h>
#include<stdlib.h>
#include<string.h>

int main()
{
    char arr[201] = { 0 }, temp[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ", str[] = "VWXYZABCDEFGHIJKLMNOPQRSTU";
    int n = 1;
    do
    {
        gets(arr);
        int i = 0, len = 0, j = 0;
        if (n % 3 == 2)
        {
            len = strlen(arr);
            for (i = 0; i < len; i++)
            {
                for (j = 0; j < 26; j++)
                {
                    if (arr[i] == temp[j])
                    {
                        arr[i] = str[j];
                        break;
                    }
                }
                printf("%c", arr[i]);
            }
            printf("\n");
        }
    } while (strcmp(arr, "ENDOFINPUT") && n++);

    return 0;
}